<template>
  <div class="mx-container">
    <zz-sub-nav :list="list" :index.sync="index">
      <div class="sub-nav-content">
        <div>
          <div class="details-title">{{ $t("zz.product_presentation") }}</div>
          <div>
            <zz-card>
              <div slot="content">
                <p>{{ $t("zz.scheme.video.join.des.definition") }}</p>
                <p>{{ $t("zz.scheme.video.join.des.product") }}</p>
                <p>{{ $t("zz.scheme.video.join.des.fun") }}</p>
                <p>{{ $t("zz.scheme.video.join.des.location") }}</p>
              </div>
              <img
                src="@/assets/img/video/video1-1.png"
                slot="img"
                alt=""
                width="420"
              />
            </zz-card>
          </div>
        </div>
        <div>
          <div class="details-title">{{ $t("zz.industry_development") }}</div>
          <div>
            <h4 class="marginTitle">
              {{ $t("zz.scheme.video.industry.live.title") }}
            </h4>
            <zz-card titleSize="small" class="marginB">
              <span slot="title">{{
                $t("zz.scheme.video.industry.live.1.subtitle")
              }}</span>
              <div slot="content">
                {{ $t("zz.scheme.video.industry.live.1.des") }}
              </div>
              <img
                :src="$t('zz.img.video2-1')"
                slot="img"
                alt=""
                width="420"
              />
            </zz-card>
            <zz-card titleSize="small" class="marginB">
              <span slot="title">{{
                $t("zz.scheme.video.industry.live.2.subtitle")
              }}</span>
              <div slot="content">
                {{ $t("zz.scheme.video.industry.live.2.des") }}
              </div>
              <img
                :src="$t('zz.img.video2-2')"
                slot="img"
                alt=""
                width="420"
              />
            </zz-card>
          </div>
          <div>
            <h4 class="marginTitle">
              {{ $t("zz.scheme.video.industry.appeal.title") }}
            </h4>
            <div class="flex-3 suqiuList">
              <div class="flex-3-item suqiu-item">
                <div class="small-cir">{{ $t("zz.scheme.video.industry.appeal.1.content") }}</div>
                <div class="suqiu-item-intro">
                  <h4>{{ $t("zz.scheme.video.industry.appeal.1.title") }}</h4>
                  <p>{{ $t("zz.scheme.video.industry.appeal.1.des") }}</p>
                </div>
              </div>
              <div class="flex-3-item suqiu-item">
                <div class="default-cir">{{ $t("zz.scheme.video.industry.appeal.2.content") }}</div>
                <div class="suqiu-item-intro">
                  <h4>{{ $t("zz.scheme.video.industry.appeal.2.title") }}</h4>
                  <p>{{ $t("zz.scheme.video.industry.appeal.2.des") }}</p>
                </div>
              </div>
              <div class="flex-3-item suqiu-item">
                <div class="big-cir">{{ $t("zz.scheme.video.industry.appeal.3.content") }}</div>
                <div style="display: flex">
                  <i class="iconfont icon-up suqiu-up-icon"></i>
                  <div class="suqiu-item-intro">
                    <h4>{{ $t("zz.scheme.video.industry.appeal.3.title") }}</h4>
                    <p>
                      {{
                        isPC
                          ? $t("zz.scheme.video.industry.appeal.3.des")
                          : $t("zz.scheme.video.industry.appeal.3.des.pc")
                      }}
                    </p>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div>
          <div class="details-title">{{ $t("zz.core_advantage") }}</div>
          <img :src="$t('zz.img.video3-1')" slot="img" alt="" />
          <div class="flex-2 marginDivision">
            <div class="flex-2-item">
              <sim-card :title="$t('zz.scheme.video.kernel.1.title')">
                <ul class="list-has-poi" slot="content">
                  <li>{{ $t("zz.scheme.video.kernel.1.1.des") }}</li>
                  <li>{{ $t("zz.scheme.video.kernel.1.2.des") }}</li>
                </ul>
              </sim-card>
            </div>
            <div class="flex-2-item">
              <sim-card :title="$t('zz.scheme.video.kernel.2.title')">
                <ul class="list-has-poi" slot="content">
                  <li>{{ $t("zz.scheme.video.kernel.2.1.des") }}</li>
                  <li>{{ $t("zz.scheme.video.kernel.2.2.des") }}</li>
                  <li>{{ $t("zz.scheme.video.kernel.2.3.des") }}</li>
                </ul>
              </sim-card>
            </div>
            <div class="flex-2-item">
              <sim-card :title="$t('zz.scheme.video.kernel.3.title')">
                <ul class="list-has-poi" slot="content">
                  <li>{{ $t("zz.scheme.video.kernel.3.1.des") }}</li>
                  <li>{{ $t("zz.scheme.video.kernel.3.2.des") }}</li>
                  <li>{{ $t("zz.scheme.video.kernel.3.3.des") }}</li>
                </ul>
              </sim-card>
            </div>
            <div class="flex-2-item">
              <sim-card :title="$t('zz.scheme.video.kernel.4.title')">
                <ul class="list-has-poi" slot="content">
                  <li>{{ $t("zz.scheme.video.kernel.4.1.des") }}</li>
                  <li>{{ $t("zz.scheme.video.kernel.4.2.des") }}</li>
                </ul>
              </sim-card>
            </div>
          </div>
          <h3 class="marginDivision">
            {{ $t("zz.scheme.video.kernel.MSU.title") }}
          </h3>
          <zz-card position="left">
            <img
              src="@/assets/img/video/video3-2.png"
              alt=""
              slot="img"
              width="356px"
            />
            <div slot="content">
              <ul class="list-has-poi">
                <li>{{ $t("zz.scheme.video.kernel.MSU.1.des") }}</li>
                <div style="height: 30px"></div>
                <li>{{ $t("zz.scheme.video.kernel.MSU.2.des") }}</li>
                <div style="height: 30px"></div>
                <li>{{ $t("zz.scheme.video.kernel.MSU.3.des") }}</li>
              </ul>
            </div>
          </zz-card>
          <div class="marginDivision">
            <h3>{{ $t("zz.scheme.video.kernel.VQ.title") }}</h3>
            <p>{{ $t("zz.scheme.video.kernel.VQ.des") }}</p>
            <img src="@/assets/img/video/video3-3.png" alt="" />
            <h3 class="marginTitle">
              {{ $t("zz.scheme.video.kernel.sdk.title") }}
            </h3>
            <p>{{ $t("zz.scheme.video.kernel.sdk.des") }}</p>
            <div style="height: 20px"></div>
            <zz-card position="left">
              <img
                src="@/assets/img/video/video3-4.png"
                alt=""
                slot="img"
                width="356"
              />
              <div slot="content">
                <sim-card
                  :title="$t('zz.scheme.video.kernel.sdk.1.subtitle')"
                  class="marginTitle"
                >
                  <ul slot="content" class="list-has-poi">
                    <li>{{ $t("zz.scheme.video.kernel.sdk.1.1.des") }}</li>
                    <li>{{ $t("zz.scheme.video.kernel.sdk.1.2.des") }}</li>
                  </ul>
                </sim-card>
                <sim-card
                  :title="$t('zz.scheme.video.kernel.sdk.2.subtitle')"
                  class="marginTitle"
                >
                  <ul slot="content" class="list-has-poi">
                    <li>{{ $t("zz.scheme.video.kernel.sdk.2.1.des") }}</li>
                    <li>{{ $t("zz.scheme.video.kernel.sdk.2.2.des") }}</li>
                  </ul>
                </sim-card>
                <sim-card
                  :title="$t('zz.scheme.video.kernel.sdk.3.subtitle')"
                  class="marginTitle"
                >
                  <ul slot="content" class="list-has-poi">
                    <li>{{ $t("zz.scheme.video.kernel.sdk.3.1.des") }}</li>
                    <li>{{ $t("zz.scheme.video.kernel.sdk.3.2.des") }}</li>
                  </ul>
                </sim-card>
              </div>
            </zz-card>
          </div>
        </div>
        <div style="min-height: 600px">
          <div class="details-title">{{ $t("zz.application_scenarios") }}</div>
          <div class="header-nav-wrapper-wrap">
            <ul class="header-nav-wrapper">
              <li
                v-for="(item, i) in list[3].child"
                :key="i"
                :class="item.index == subIndex ? 'active' : ''"
                @click="navClick(item)"
              >
                {{ item.name }}
              </li>
            </ul>
          </div>
          <div v-if="subIndex == 1">
            <div class="flex-2 app-wrap">
              <div class="flex-2-item">
                <zz-card titleSize="small" position="bottom">
                  <span slot="title">{{
                    $t("zz.scheme.video.app.1.1.title")
                  }}</span>
                  <p slot="content">{{ $t("zz.scheme.video.app.1.1.des") }}</p>
                  <img
                    src="@/assets/img/video/video4-1.png"
                    alt=""
                    slot="img"
                    width="276"
                  />
                </zz-card>
              </div>
              <div class="flex-2-item">
                <zz-card titleSize="small" position="bottom">
                  <span slot="title">{{
                    $t("zz.scheme.video.app.2.1.title")
                  }}</span>
                  <p slot="content">{{ $t("zz.scheme.video.app.2.1.des") }}</p>
                  <img
                    src="@/assets/img/video/video4-2.png"
                    alt=""
                    slot="img"
                    width="276"
                  />
                </zz-card>
              </div>
              <div class="flex-2-item">
                <zz-card titleSize="small" position="bottom">
                  <span slot="title">{{
                    $t("zz.scheme.video.app.3.1.title")
                  }}</span>
                  <p slot="content">{{ $t("zz.scheme.video.app.3.1.des") }}</p>
                  <img
                    src="@/assets/img/video/video4-3.png"
                    alt=""
                    slot="img"
                    width="276"
                  />
                </zz-card>
              </div>
              <div class="flex-2-item">
                <zz-card titleSize="small" position="bottom">
                  <span slot="title">{{
                    $t("zz.scheme.video.app.4.1.title")
                  }}</span>
                  <p slot="content">{{ $t("zz.scheme.video.app.4.1.des") }}</p>
                  <img
                    src="@/assets/img/video/video4-4.png"
                    alt=""
                    slot="img"
                    width="276"
                  />
                </zz-card>
              </div>
            </div>
          </div>
          <div v-else-if="subIndex == 2" class="marginTop">
            <img :src="$t('zz.img.video4-5')" alt="" />
          </div>
          <div v-else-if="subIndex == 3" class="marginTop">
            <zz-card position="left">
              <div slot="content">
                <sim-card :title="$t('zz.scheme.video.app.3.1.title')">
                  <ul class="list-has-poi" slot="content">
                    <li>{{$t('zz.scheme.video.app.3.1.1.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.1.2.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.1.3.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.1.4.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.1.5.des')}}</li>
                  </ul>
                </sim-card>
                <sim-card :title="$t('zz.scheme.video.app.3.2.title')" class="marginDivision">
                  <ul class="list-has-poi" slot="content">
                    <li>{{$t('zz.scheme.video.app.3.2.1.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.2.2.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.2.3.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.2.4.des')}}</li>
                    <li>{{$t('zz.scheme.video.app.3.2.5.des')}}</li>
                  </ul>
                </sim-card>
              </div>
              <img
                :src="$t('zz.img.video4-6')" 
                alt=""
                slot="img"
                width="573"
              />
            </zz-card>
          </div>
          <div v-else-if="subIndex == 4" class="marginTop">
            <img  :src="$t('zz.img.video4-7')"  alt="" />
          </div>
        </div>
      </div>
    </zz-sub-nav>
  </div>
</template>

<script>
import SubNav from "@/components/SubNav/index.vue";
import ZzCard from "@/components/ZzCard";
import SimCard from "@/components/SimCard";
import { mapGetters } from "vuex";

export default {
  data() {
    return {
      index: 1,
      subIndex: 1,
      
    };
  },

  components: {
    "zz-sub-nav": SubNav,
    ZzCard,
    SimCard,
  },
  props: {},
  mounted() {},
  computed: {
    activeItem: function () {
      let activeItem = this.list.find((v) => v.index == this.index);
      console.log(this.list[this.index]);
      this.subIndex = activeItem.child ? activeItem.child[0].index : 1;
      return activeItem;
    },
    ...mapGetters({
      isPC: "isPC",
    }),
    list: function(){return [
        {
          name: this.$t("zz.product_presentation"),
          index: 1,
          title: this.$t("zz.product_presentation"),
        },
        { name: this.$t("zz.industry_development"), index: 2 },
        { name: this.$t("zz.core_advantage"), index: 3 },

        {
          name: this.$t("zz.application_scenarios"),
          index: 4,
          child: [
            { name: this.$t("zz.application_scenarios"), index: 1 },
            { name: this.$t("zz.scheme.video.app.2.title"), index: 2 },
            { name: this.$t("zz.scheme.video.app.3.title"), index: 3 },
            { name: this.$t("zz.scheme.video.app.4.title"), index: 4 },
          ],
        },
      ]
    },
  },
  watch: {},
  methods: {
    navClick(a_item) {
      console.log(a_item);
      this.subIndex = a_item.index;
    },
  },
  destroyed() {},
};
</script>
<style lang='scss' scoped>
@import "@/style/variables.scss";

.sub-nav-content {
  padding: 12px 48px;
  flex: 1;
  width: 100%;
  .pro-title {
    color: $color;
    font-size: 20px;
    padding: 20px 45px;
    border-bottom: 1px solid $border;
  }
  .pro-intro-wrap {
    padding: 30px 48px;
  }
  img {
    max-width: 100%;
  }
}
.son-pro-wrap {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  & > div {
    width: 238px;
  }
}

.combo-card {
  p {
    font-size: 14px;
    line-height: 150%;
    margin-bottom: 15px;
  }
  .combo-card-flow {
    margin-bottom: 20px;
  }
  .combo-card-money {
    text-align: center;
    margin: 30px 0;
    .combo-card-now-money {
      display: flex;
      font-size: 30px;
      line-height: 150%;
      justify-content: center;
      align-items: center;
      .unit {
        font-size: 20px;
        line-height: 150%;
        margin-top: 5px;
        margin-left: 10px;
      }
    }
  }
}

.small-cir {
  width: 165px;
  height: 165px;
  background-color: $subColor;
}
.default-cir {
  width: 198px;
  height: 198px;
  background-color: $subColor;
}
.big-cir {
  width: 241px;
  height: 241px;
  background-color: $blue;
}
[class$="-cir"] {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 19px;
  color: #fff;
  line-height: 150%;
  text-align: center;
  white-space: pre-line;
}

.suqiuList {
  align-items: flex-end;
  justify-content: center;
  .suqiu-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .suqiu-item-intro {
      margin-top: 25px;
      h4 {
        font-size: 16px;
        line-height: 150%;
      }
      p {
        color: $subColor;
        font-size: 12px;
        line-height: 150%;
        text-align: center;
      }
    }
    .suqiu-up-icon {
      color: #3860f4;
      font-size: 40px;
      margin: 30px 10px 0 0;
    }
  }
}
.app-wrap {
  & > div {
    width: 336px;
    padding: 30px;
  }
}
@media screen and (max-width: 768px) {
  .suqiuList {
    justify-content: space-between;
    .suqiu-item {
      width: auto;
      margin: 0 0.1rem 0 0;
      &:last-child {
        margin-right: 0;
      }
      .small-cir {
        width: 1.7rem;
        height: 1.7rem;
        font-size: 0.2rem;
      }
      .default-cir {
        width: 2rem;
        height: 2rem;
        font-size: 0.2rem;
      }
      .big-cir {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.2rem;
      }
      .suqiu-item-intro {
        text-align: center;
        h4 {
          font-size: 0.2rem;
        }
        p {
          font-size: 0.2rem;
        }
      }
      .suqiu-up-icon {
        font-size: 18px;
        margin: 1.2rem 0.1rem 0 0;
      }
    }
  }
}
</style>